home *** CD-ROM | disk | FTP | other *** search
/ PC Media 7 / PC MEDIA CD07.iso / share / uwin / cassette / mainfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-28  |  2.3 KB  |  72 lines

  1. // Copyright (c) 1994, William Wagner
  2. // All Rights reserved.
  3. //
  4. // This source is a portion of a shareware program.  It may be distributed
  5. // only in its entirety.  The copyright statements must be included with any 
  6. // reproduction of this source.
  7. // 
  8. // mainfrm.h : interface of the CMainFrame class
  9. //
  10. #ifndef __MAINFRM_H__
  11. #define __MAINFRM_H__
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // The CMainFrame class is the main window.
  15. // Its responsibilities are to be the container for all classes pertaining 
  16. // to the tape labeler.
  17. // This entails creating the splitter, the toolbar, and the status bar.
  18. // That's about it.
  19. // FormView related objects are very difficult to print.  So, I created
  20. // a second view class.  This class is a ScrollView related class that
  21. // allows me to print more easily.
  22.  
  23. class CMainFrame : public CFrameWnd
  24. {
  25. protected: // create from serialization only
  26.     //Default constructor, from Serialization.
  27.     CMainFrame();
  28.     DECLARE_DYNCREATE(CMainFrame)
  29.  
  30. // Attributes
  31. public:
  32.     //Return pointers to the PrintView and the Tape Form View.
  33.     CPrintView* GetPrintView ();
  34.     CTapeView*  GetTapeView ();
  35.     
  36. // Implementation
  37. public:
  38.     //Destructor.
  39.     virtual ~CMainFrame();
  40.  
  41. #ifdef _DEBUG
  42.     virtual    void AssertValid() const;
  43.     virtual    void Dump(CDumpContext& dc) const;
  44. #endif
  45.  
  46. protected:    // control bar embedded members
  47.     //This main frame has a status bar, a tool bar, and a splitter.
  48.     CStatusBar        m_wndStatusBar;
  49.     CToolBar        m_wndToolBar;
  50.     CSplitterWnd    m_wndSplitter;
  51.     
  52. // Generated message map functions
  53.     //This class overrides the Create, Create Client functions to 
  54.     // create the splitter window.  
  55.     // It also handles the print related command.  This is to handle
  56.     // setting the active view correctly.  The Print View must be 
  57.     // the active view when the print code is called.  FormViews
  58.     // just don't cope.  These only take control when the Print View
  59.     // is not active.
  60. protected:
  61.     //{{AFX_MSG(CMainFrame)
  62.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  63.     afx_msg BOOL OnCreateClient ( LPCREATESTRUCT lpCreateStruct, CCreateContext* pContext);
  64.     afx_msg void OnFilePrintPreview();
  65.     afx_msg void OnFilePrint();
  66.     //}}AFX_MSG
  67.     DECLARE_MESSAGE_MAP()
  68. };
  69.  
  70. /////////////////////////////////////////////////////////////////////////////
  71. #endif
  72.